package models
{
	import mx.collections.ArrayCollection;

	public class State extends Object
	{
		[Bindalble]
		public var id:Number;
			
		[Bindable]
		public var variables:ArrayCollection = new ArrayCollection();
		
		// Source line number
		[Bindable]
		public var lineNumber:Number;
		
		[Bindable]
		public var consoleLineNumber:Number;
		
		public function State()
		{
			super();
		}
		
		public function findVariableByName(name:String):Variable{
			for each(var variable:Variable in variables){
				if(variable.name == name)
					return variable;
			}
			
			return null;
		}
		
	}
}